<?php if(!empty($dataMovie)):?>
	<?php 
		switch($module_type):
		  	case 'clip':
				$path_url = $movie_url.'play/';
				$class = "movieItemA";
				$show_date = "เมื่อ";
				$show_view = "จำนวนที่ดู";
		  	break;
			case 'showing':
			case 'coming_soon':
			case 'hit':
				$path_url = $movie_url.'play/';
				$class = "movieItemC";
				$show_date = "ฉาย";
				$show_view = "จำนวนที่ดู";		
			break;
			case 'music':
				$path_url = $music_url.'play/';
				$class = "musicItem";
				$show_date = "";
				$show_view = "";			
			break;
			case 'news':
				$path_url = $news_url.'archives/';
				$class = "newsItem";
				$show_date = "เมื่อ";
				$show_view = "จำนวนคนอ่าน";		
			break;
		endswitch;
	?>
	<?php foreach($dataMovie as $value):?>
			<div class="<?php echo $class;?>">
				<a target="_blank" href="<?php echo $path_url.$value->id.'-'.seo_url($value->name);?>" title="<?php echo $value->name;?>">
					<div class="thumb">
						<?php echo exec_image(array(
								'folder' => $image_folder,
								'dimension' => $image_demension,
								'file_name' => @$value->image->image_file_name.'.'.@$value->image->image_file_ext,
								'alt' => ''.@$value->name.'',	
								'title' => ''.@$value->name.''	
							)
						);?>
					</div>
				</a>
				<div class="title">
					<?php if($module_type == 'music'):?>
						<!--Playlist-->
						<a href="<?php echo $playlist_url.'music/'.$value->id.'-'.seo_url($value->name);?>" target="_blank" class="_playlist" title="add to playlist"></a>
					<?php endif;?>		
					<a target="_blank" href="<?php echo $path_url.$value->id.'-'.seo_url($value->name);?>" title="<?php echo $value->name;?>">
						<?php echo $value->name;?>
					</a>
				</div>
				<?php if(!empty($show_date)):?>
				<div class="date">
					<?php echo $show_date." ".convertDatetimeToThai($value->date);?>
				</div>
				<?php endif;?>
				<?php if(!empty($show_view)):?>			
				<div class="view">
					<?php echo $show_view." ".$value->views." ครั้ง";?>
				</div>
				<?php endif;?>
			</div>	
	<?php endforeach;?>
	<div class="clearfix"></div>
	<div class="pager">
		<?php if(!empty($pager)) echo $pager;?>
	</div>	
<?php else:?>
	ไม่มีข้อมูล
<?php endif;?>